Xbasic

{TEXT}

Syntax

{TEXT= [ %Directives% ] Width [, Height ][ : ] Text_Variable [ ? Enabled ] }

Arguments

%Directives%

Character. Refer to Xdialog Language Directives and Operators.

Width

Numeric. An integer value for the maximum number of characters to display on one line. The actual number displayed may be less because of word wrap.

Height

Numeric. Optional. Default = 1. The number of rows to display. This may be a fractional number, such as 1.25.

Text_Variable

Character. The name of character variable containing the text to display.

Enabled

Logical. Optional. See Enabled Syntax.

Description

Displays text from a character variable.

You must not have any space characters in the finished command.

The {TEXT} command displays text from a character variable. One or more {text=text_specification} statements may appear inside the Format section of a UI_DLG_BOX() function.

Example

This example shows what happens when the text is defined to be 40 characters wide, but no Row count is provided.

content = "Alpha Anywhere contains a powerful programming language called Xbasic. Xdialog is an extension of Xbasic that allows you to create dialog boxes."
ui_dlg_box("Disclaimer",<<%dlg%
{font=arial,10}
{text=40,5content};
<&Agree>  <&Disagree>
%dlg%)
images/XD_Dynamic_text_1.gif

The following example displays 5 rows of text.

content = "Alpha Anywhere contains a powerful programming language called Xbasic. Xdialog is an extension of Xbasic that allows you to create dialog boxes."
ui_dlg_box("Disclaimer",<<%dlg%
{font=arial,10}
{text=%H=R%40,5content};
<&Agree> <&Disagree>
%dlg%)
images/XD_Dynamic_text_2_v6.gif

The ampersand "&" is used for hot keys. To display an ampersand you must use a double ampersand.

mytext="peter && paul"
ui_dlg_box(mytext,<<%dlg%
{text=30,1mytext};
;
%dlg%)

Limitations

Desktop applications only

See Also